//_url 地址 data req数据
function wxRequest(_url,data,callback){
	// let data = data || {}
	wx.request({
		url:_url,
		data:data,
		method:'POST',
		header:{
			"Content-Type":"application/x-www-form-urlencoded"
		},
		success:(res)=>{
			callback(res)
		}
	})
}
//登录方法 
function wxLogin(callback){
	wx.login({
	    success: function(res) {
	      callback(res.code);
	  	}
    })
}
exports.wxRequest = wxRequest
exports.wxLogin = wxLogin



